{ INFORMATICS.MCCME.RU
  Problem statement: http://informatics.mccme.ru/moodle/mod/statements/view3.php?chapterid=3166
  Verdict: Accepted
}
uses SysUtils, Math;
 
const
	firstV:int64=round(1e12);
 
var
	k,kk,ls,cc,qq:int64;
	i:longint;
	s:string;
	a:array[0..100010] of longint;
 
begin
reset(input,'input.txt');
rewrite(output,'output.txt');
readln(s);
cc:=0;
ls:=length(s);
while ls>0 do begin
	kk:=pos(' ',s);
	if kk=0 then begin
		k:=strtoint(s);
		s:='';
	end else begin
		k:=strtoint(copy(s,1,kk-1));
		delete(s,1,kk);
	end;
	ls:=length(S);
	inc(cc);
	a[cc]:=k;
end;
write(a[cc],' ');
qq:=cc-1;
for i:=1 to qq do
	write(a[i],' ');
end.